{% load i18n %}

{% ifnotequal page.paginator.num_pages 1 %}

	<div class="pagination">
		<span class="summary-count">
			{{ page.object_list|length }} / {{ page.paginator.count }}
		</span>
	    <span class="step-links">
	    {% if page.has_previous %}
	        <a href="?page={{ page.previous_page_number }}" class="previous">{% trans "previous" %}</a>
	    {% endif %}
	
	        {% for pnum in begin %}
	            {% ifequal page.number pnum %}
	                <span class="current">{{ pnum }}</span>
	            {% else %}
	                <a href="?page={{ pnum }}">{{ pnum }}</a>
	            {% endifequal %}
	        {% endfor %}
	
	        {% if middle %}
	            <span class="continue">...</span>
	            {% for pnum in middle %}
	                {% ifequal page.number pnum %}
	                    <span class="current">{{ pnum }}</span>
	                {% else %}
	                    <a href="?page={{ pnum }}">{{ pnum }}</a>
	                {% endifequal %}
	            {% endfor %}
	        {% endif %}
	
	        {% if end %}
	            <span class="continue">...</span>
	            {% for pnum in end %}
	                {% ifequal page.number pnum %}
	                    <span class="current">{{ pnum }}</span>
	                {% else %}
	                    <a href="?page={{ pnum }}">{{ pnum }}</a>
	                {% endifequal %}
	            {% endfor %}
	        {% endif %}
	
	    {% if page.has_next %}
	        <a href="?page={{ page.next_page_number }}" class="next">{% trans "next" %}</a>
	    {% endif %}
	    </span>
	</div>

{% endifnotequal %}
